"JSON转换 + 远程提交
FUNCTION ZFM_FICO_SAPTOAIP.
*本地接口
*IMPORTING
*REFRENCE(IM_YWLX) TYPE CHAR100 DEFAULT 'FI_GET_BUDGET'
*TABLES
*IMT_DJXX
*CHANGING
*REFRENCE(RETURN) TYPE STRING OPTIONAL
DATA: EX_JSON TYPE STRING,
LO_SYS_EXCEPTION TYPE REF TO CX_AI_SYSTEM_FAULT,
LO_CLIENTPROXY TYPE REF TO ZFICO_BUDGET_PERDORMANCE_WEB_S,
PARAMETERS TYPE ZFIAPIENTRANCE.
^
|
******************************************************************
ZFIAPIENTRANCE:
CONTROLLER 类型 PRXCTRLTAB
ARG0 类型 STRING
ARG1 类型 STRING
******************************************************************

DATA: APIENTRANCE TYPE ZFIPIENTRANCE1.
^
|
******************************************************************
ZFIPIENTRANCE1:
CONTROLLER 类型 PRXCTRLTAB
PARAMETERS 类型 ZFIAPIENTRANCE
******************************************************************
DATA: APIENTRANCE_RESPONSE TYPE ZFIAPITRANCE_RESPONSE1.
^
|
******************************************************************
ZFIAPITRANCE_RESPONSE1:
CONTROLLER 类型 PRXCTRLTAB
PARAMETERS 类型 ZFIAPITRANCE_RESPONSE
    ^
    |
******************************************************************
ZFIAPITRANCE_RESPONSE:
CONTROLLER 类型 PRXCTRLTAB
RETURN 类型 STRING
******************************************************************

CALL FUNCTION 'ZPS_FUN_MAIN_JSON'
EXPORTING
E_TAB = IMT_DJXX[]
IMPORTING
ZJSON = EX_JSON.

APIENTRANCE-PARAMETERS-ARG0 = IM_YWLX.
APIENTRANCE-PARAMETERS-ARG1 = EX_JSON.

CREATE OBJECT LO_CLIENTPROXY.
TRY.
    CALL METHOD LO_CLIENTPROXY->APIENTRANCE
    EXPORTING
    APIENTRANCE = APIENTRANCE
    IMPORTING
    APIENTRANCE_RESPONSE = APIENTRANCE_RESPONSE.
    
    CATCH CX_AI_SYSTEM_FAULT INTO LO_SYS_EXCEPTION.
ENDTRY.

RETURN = APIENTRANCE_RESPONSE-PARAMETERS-RETURN.
ENDFUNCTION.